﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Administrador_Compras_Default : System.Web.UI.Page {
   
    PetShopService.CompraServicos compraServicos = new PetShopService.CompraServicos();
    PetShopService.UsuarioServicos oUsuarioServicos = new PetShopService.UsuarioServicos();

    protected void Page_Load(object sender, EventArgs e)
    {

        if (!oUsuarioServicos.isUsuarioAdministrador())
            Response.Redirect("~/default.aspx");

        gvCompras.DataSource = compraServicos.RetornaUltimasCincoComrpas();
        gvCompras.DataBind();
    }
}